home *** CD-ROM | disk | FTP | other *** search
/ Adventures with Oslo: Tools & Gadgets / Adventures with Oslo - Tools and Gadgets.ISO / mac / Ad / Mod03 / Puzzles / pictpath.Dir / 00061.ls < prev    next >
Encoding:
Text File  |  1994-09-23  |  1015 b   |  38 lines

  1. on startMovie
  2.   global lastDot, nextLine, allRight
  3.   set HC to the number of cast "handCursor"
  4.   cursor([HC, HC + 1])
  5.   set lastDot to 0
  6.   set nextLine to 24
  7.   set allRight to 1
  8. end
  9.  
  10. on nextDot
  11.   global lastDot, nextLine, allRight
  12.   if lastDot <> 0 then
  13.     set rise to float(the locV of sprite the clickOn - the locV of sprite lastDot)
  14.     set run to float(the locH of sprite the clickOn - the locH of sprite lastDot)
  15.     if run <> 0 then
  16.       if (rise / run) < 0 then
  17.         set the type of sprite nextLine to 6
  18.       end if
  19.     end if
  20.     spriteBox(nextLine, the locH of sprite lastDot, the locV of sprite lastDot, the locH of sprite the clickOn, the locV of sprite the clickOn)
  21.     updateStage()
  22.     if (the clickOn - 1) <> lastDot then
  23.       set allRight to 0
  24.     end if
  25.     set nextLine to nextLine + 1
  26.     if nextLine = 45 then
  27.       if allRight then
  28.         puppetSound(0)
  29.         go("seesaw")
  30.       else
  31.         beep()
  32.         continue()
  33.       end if
  34.     end if
  35.   end if
  36.   set lastDot to the clickOn
  37. end
  38.